From c415ceb08e33411ec4f7bf472982116b4170489e Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 9 Jul 2010 17:16:41 +0100 Subject: [PATCH] x86 hvm: Add a hypercall to allow HVM PV drivers to insert xentrace records Signed-off-by: Tim Deegan --- xen/arch/x86/hvm/hvm.c | 17 +++++++++++++++++ xen/include/public/hvm/hvm_op.h | 9 +++++++++ xen/include/public/trace.h | 1 + 3 files changed, 27 insertions(+) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 2ff8cefede..ee27359bb0 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3197,6 +3197,23 @@ long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg) break; } + case HVMOP_xentrace: { + xen_hvm_xentrace_t tr; + + if ( copy_from_guest(&tr, arg, 1 ) ) + return -EFAULT; + + if ( tr.extra_bytes > sizeof(tr.extra) + || (tr.event & ~((1u<